Optimal. Leaf size=49 \[ -\frac{(a+b) \tanh ^2(c+d x)}{2 d}+\frac{(a+b) \log (\cosh (c+d x))}{d}-\frac{b \tanh ^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0594662, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3631, 3473, 3475} \[ -\frac{(a+b) \tanh ^2(c+d x)}{2 d}+\frac{(a+b) \log (\cosh (c+d x))}{d}-\frac{b \tanh ^4(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3631
Rule 3473
Rule 3475
Rubi steps
\begin{align*} \int \tanh ^3(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=-\frac{b \tanh ^4(c+d x)}{4 d}+(a+b) \int \tanh ^3(c+d x) \, dx\\ &=-\frac{(a+b) \tanh ^2(c+d x)}{2 d}-\frac{b \tanh ^4(c+d x)}{4 d}+(a+b) \int \tanh (c+d x) \, dx\\ &=\frac{(a+b) \log (\cosh (c+d x))}{d}-\frac{(a+b) \tanh ^2(c+d x)}{2 d}-\frac{b \tanh ^4(c+d x)}{4 d}\\ \end{align*}
Mathematica [A] time = 0.235594, size = 43, normalized size = 0.88 \[ -\frac{2 (a+b) \tanh ^2(c+d x)-4 (a+b) \log (\cosh (c+d x))+b \tanh ^4(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.004, size = 104, normalized size = 2.1 \begin{align*} -{\frac{b \left ( \tanh \left ( dx+c \right ) \right ) ^{4}}{4\,d}}-{\frac{a \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{b \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) a}{2\,d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) b}{2\,d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) a}{2\,d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) b}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.66453, size = 227, normalized size = 4.63 \begin{align*} b{\left (x + \frac{c}{d} + \frac{\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac{4 \,{\left (e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d{\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} + a{\left (x + \frac{c}{d} + \frac{\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac{2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d{\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.1544, size = 3336, normalized size = 68.08 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.639558, size = 88, normalized size = 1.8 \begin{align*} \begin{cases} a x - \frac{a \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{a \tanh ^{2}{\left (c + d x \right )}}{2 d} + b x - \frac{b \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{b \tanh ^{4}{\left (c + d x \right )}}{4 d} - \frac{b \tanh ^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (a + b \tanh ^{2}{\left (c \right )}\right ) \tanh ^{3}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21444, size = 130, normalized size = 2.65 \begin{align*} -\frac{{\left (d x + c\right )}{\left (a + b\right )}}{d} + \frac{{\left (a + b\right )} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{d} + \frac{2 \,{\left ({\left (a + 2 \, b\right )} e^{\left (6 \, d x + 6 \, c\right )} + 2 \,{\left (a + b\right )} e^{\left (4 \, d x + 4 \, c\right )} +{\left (a + 2 \, b\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]